package mil.af.amc.adpetracker.aop;

import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.aop.AfterReturningAdvice;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.lang.reflect.Method;

/**
 * Please Fill in this Javadoc
 *
 * @author TSgt Jason Ferguson
 */

public class EquipmentItemServiceAdvice implements MethodBeforeAdvice, AfterReturningAdvice {

    private Log log = LogFactory.getLog(EquipmentItemServiceAdvice.class);

    public void before(Method method, Object[] args, Object target) throws Throwable {

        // Trace Logging
        log.trace("Called method " + method.getName());
    }

    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {

        // Maintenance Log

        // Email

        // Info Logging

        // Trace Logging
        log.trace("Method " + method.getName() + " completed.");
    }
}
